<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        const obj = {
            name: '王磊'
        }
        const formData = new FormData(obj)
        // formData.append('name', obj.name)
        // formData.append('age', 18)
        // console.log(obj)
        // JSON.stringify({
        //     age:formData.get('age')
        // })
        console.log(obj)
    </script>
</body>

</html>